package com.hjc.springbootstudyweb.controller;

import com.hjc.springbootstudyweb.entity.UsersModel;
import com.hjc.springbootstudyweb.service.ServiceImpl.UsersServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by IntelliJ IDEA.
 * User: HJC
 * Date: 2019/12/1
 * Time: 21:54
 * To change this template use File | Settings | File Templates.
 */
@RestController
@RequestMapping("/users")
public class UsersController {

    @Autowired
    private UsersServiceImpl usersService;

    @RequestMapping(value = "getUsers" ,method = RequestMethod.POST)
    public UsersModel getUsers(String uid , String password){
        return usersService.queryById(uid, password);
    }
}
